class ServiceItem < ApplicationRecord
  mount_uploader :avatar, BaseUploader
  
  validates :name, presence: true, uniqueness: true
  
  has_many :spu_service_items, dependent: :destroy
  accepts_nested_attributes_for :spu_service_items, allow_destroy: true
  has_many :spus, through: :spu_service_items
end
